package it.koutifaris.travianmap.view.serversettingsview;

import it.koutifaris.travianmap.command.Command;

class OKClickCommand implements Command {

	private final MapUrlVerifier urlVerifier;
	private final ServerViewModel model;
	private final ServerView view;

	public OKClickCommand(ServerView view, ServerViewModel model, MapUrlVerifier urlVerifier) {
		this.model = model;
		this.urlVerifier = urlVerifier;
		this.view = view;
	}

	@Override
	public void execute() {
		view.showProgressBar();
		urlVerifier.verifyServerString(model.getServer());
	}

}
